from mode import List


class Solution:
    def isStraight(self, nums: List[int]) -> bool:
        repeat = set()
        numMax, numMin = 0, 14
        for i in nums:
            if i == 0:
                continue
            numMax = max(i, numMax)
            numMin = min(i, numMin)
            if i in repeat:
                return False
            repeat.add(i)
        return numMax - numMin < 5


A = Solution()
nums = [6, 7, 8, 9, 10]
target = 8
print(A.isStraight(nums))
